﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "IGraphicsNode.h"
#include "RuntimeId.h"

namespace gcmp
{
    class IGraphicsElementShape;
    class IDocument;

    /// \brief 文档图形表达引用图形节点
    class GCMP_GRAPHICS_NODE_INTERFACE_EXPORT IGraphicsOtherDocumentElementShapeReference : public IGraphicsNode
    {
        DEFINE_CAST_DERIVED(IGraphicsOtherDocumentElementShapeReference, IGraphicsNode)

    public:
        /// \brief 析构器
        virtual ~IGraphicsOtherDocumentElementShapeReference();

    public:
        /// \brief 设置被引用的文档的Element图形表达节点集合
        /// \param graphicsElementShapes 被引用的文档的Element图形表达节点集合
        /// \return 无    
        virtual void SetDocumentReferenceGraphicsElementShapes(std::vector<const IGraphicsElementShape*> graphicsElementShapes) = 0;

        /// \brief 获取文档的Element图形表达节点集合
        /// \return Element图形表达节点集合
        virtual const std::vector<const IGraphicsElementShape*>& GetDocumentReferenceGraphicsElementShapes() const = 0;

        /// \brief 设置文档的运行时id
        /// \param inputRuntimeId 运行时id
        /// \return 无    
        virtual void SetReferenceDocumentRuntimeId(RuntimeId inputRuntimeId) = 0;

        /// \brief 获取文档的运行时id
        /// \return 文档的运行时id
        virtual RuntimeId GetReferenceDocRuntimeId() const = 0;

        /// \brief 获取相对于被引用的文档几何的转换矩阵
        /// \return 相对于被引用的文档几何的转换矩阵
        virtual const Matrix4d& GetGraphicsElementShapesTransform() const = 0;

    public:
        /// \brief 通过被引用的文档几何的转换矩阵，来创建默认的文档几何引用图形节点
        /// \param grepsTransform 相对于被引用的文档几何的转换矩阵
        /// \return 文档几何引用图形节点
        static OwnerPtr<IGraphicsOtherDocumentElementShapeReference> Create(const Matrix4d& grepsTransform);
    };
}


